import request from '@/utils/request'

// 查询商家活动列表
export function listMerchantActivities(query) {
  return request({
    url: '/merchant/merchantActivities/list',
    method: 'get',
    params: query
  })
}

// 查询商家活动详细
export function getMerchantActivities(id) {
  return request({
    url: '/merchant/merchantActivities/' + id,
    method: 'get'
  })
}

// 新增商家活动
export function addMerchantActivities(data) {
  return request({
    url: '/merchant/merchantActivities',
    method: 'post',
    data: data
  })
}

// 修改商家活动
export function updateMerchantActivities(data) {
  return request({
    url: '/merchant/merchantActivities',
    method: 'put',
    data: data
  })
}

// 删除商家活动
export function delMerchantActivities(id) {
  return request({
    url: '/merchant/merchantActivities/' + id,
    method: 'delete'
  })
}
